
#include <m8c.h>        // part specific constants and macros
#include "PSoCAPI.h"    // PSoC API definitions for all User Modules

typedef struct
{
	unsigned char delay;
	unsigned char mode;
	unsigned char pwm;
	unsigned char signal;
} output;

typedef struct
{
	unsigned char currentindex;
	unsigned char endindex;
	unsigned char currentdelay;	
	output currentoutput[16];
} eventbuffer;

extern unsigned char event_next_pwm;
extern unsigned char event_next_signal0;
extern unsigned char event_next_signal1;
extern unsigned char event_executed;

void event_process(void);
void event_init(void);